﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ServiceModel.DomainServices.Client;
using System.ServiceModel.DomainServices.Client.ApplicationServices;
using Komunikator.Web.Resources;

namespace Komunikator.Web
{
    public class AddNewContactInfo : Entity
    {
        private string firstName;
        private string lastName;
        private string displayedName;
        private string userName;

        [Display(Name = "FirstNameLabel", ResourceType = typeof(AddNewContactResources))]
        public string FirstName
        {
            get
            {
                return this.firstName;
            }

            set
            {
                if (this.firstName != value)
                {
                    this.firstName = value;
                    this.RaisePropertyChanged("FirstName");
                }
            }
        }

        [Display(Name = "LastNameLabel", ResourceType = typeof(AddNewContactResources))]
        public string LastName
        {
            get
            {
                return this.lastName;
            }

            set
            {
                if (this.lastName != value)
                {
                    this.lastName = value;
                    this.RaisePropertyChanged("LastName");
                }
            }
        }

        [Required]
        [Display(Name = "DisplayedNameLabel", Description = "DisplayedNameDescription", ResourceType = typeof(AddNewContactResources))]
        public string DisplayedName
        {
            get
            {
                return this.displayedName;
            }

            set
            {
                if (this.displayedName != value)
                {
                    this.displayedName = value;
                    this.RaisePropertyChanged("DisplayedName");
                }
            }
        }

        [Required]
        [Display(Name = "UserNameLabel", ResourceType = typeof(AddNewContactResources))]
        public string UserName
        {
            get
            {
                return this.userName;
            }

            set
            {
                if (this.userName != value)
                {
                    this.userName = value;
                    this.RaisePropertyChanged("UserName");
                }
            }
        }
    }
}
